home *** CD-ROM | disk | FTP | other *** search
-
-
-
- sssscccchhhheeeeddddccccttttllll((((2222)))) sssscccchhhheeeeddddccccttttllll((((2222))))
-
-
-
- NNNNAAAAMMMMEEEE
- _ssss_cccc_hhhh_eeee_dddd_cccc_tttt_llll - scheduler control call
-
- CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<lllliiiimmmmiiiittttssss....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////pppprrrrccccttttllll....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////sssscccchhhheeeeddddccccttttllll....hhhh>>>>
- iiiinnnntttt sssscccchhhheeeeddddccccttttllll ((((iiiinnnntttt ccccmmmmdddd,,,, [[[[ iiiinnnntttt aaaarrrrgggg1111 [[[[ ,,,, iiiinnnntttt aaaarrrrgggg2222 ]]]] ]]]]))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- This system call is used to alter scheduling parameters of either
- individual processes or of the system as a whole. The following commands
- are supported:
-
- AAAAFFFFFFFFIIIINNNNIIIITTTTYYYY____OOOONNNN
- This command enables cache affinity for the calling or another
- process. _a_r_g_1 is the process ID of the process to be modified;
- if zero, it indicates the current process. The affinity status
- is inherited by the process's children after a fork. By default,
- affinity is on.
-
- AAAAFFFFFFFFIIIINNNNIIIITTTTYYYY____OOOOFFFFFFFF
- This command disables cache affinity for the calling or another
- process. _a_r_g_1 is the process ID of the process to be modified;
- if zero, it indicates the current process. The affinity status
- is inherited by the process's children after a fork.
-
- AAAAFFFFFFFFIIIINNNNIIIITTTTYYYY____SSSSTTTTAAAATTTTUUUUSSSS
- This command returns the current cache affinity status for the
- calling or another process. _a_r_g_1 is the process ID of the
- process to be modified; if zero, it indicates the current
- process. If affinity is on, it returns 0, otherwise 1.
-
- RRRREEEENNNNIIIICCCCEEEE This command allows a process to change its own or another
- process's _n_i_c_e value. _a_r_g_1 is the process ID of the process to
- be modified; if zero, it indicates the current process. _a_r_g_2 is
- the new process nice value to use. This is different than the
- value given to the _n_i_c_e(2) system call. _n_i_c_e takes a relative
- value, while this command changes the absolute nice value of the
- process which ranges from 0 to 39. The default absolute nice
- value for a process is 20.
-
- The process must have superuser permissions to use this command.
- The previous (absolute) nice value is returned.
-
- SSSSLLLLIIIICCCCEEEE This command allows a process to change its own or another
- process's time slice. A time slice is the period of time that a
- process is allowed to run before being eligible for preemption by
- another process. _a_r_g_1 is the process ID of the process to be
- altered; if zero, it indicates the current process. _a_r_g_2 is the
- new time slice value to use, expressed in terms of _c_l_o_c_k _t_i_c_k_s.
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- sssscccchhhheeeeddddccccttttllll((((2222)))) sssscccchhhheeeeddddccccttttllll((((2222))))
-
-
-
- The system software clock fires CCCCLLLLKKKK____TTTTCCCCKKKK times per second; hence
- the duration of a clock tick in milliseconds is equal to
- 1111000000000000////CCCCLLLLKKKK____TTTTCCCCKKKK (see <_l_i_m_i_t_s._h>). _a_r_g_2 is constrained to be greater
- than 0, and less than 10 seconds.
-
- The process must have superuser permissions to use this command.
- The previous time slice value is returned.
-
- SSSSEEEETTTTHHHHIIIINNNNTTTTSSSS
- This command sets up a communication path between the process and
- the kernel, which allows the process to communicate scheduling
- modes to the kernel without the overhead of a system call. The
- return value is a pointer to a _p_r_d_a__s_y_s structure, defined in
- <_s_y_s/_p_r_c_t_l._h>. Since the return value for _ssss_cccc_hhhh_eeee_dddd_cccc_tttt_llll is defined as
- an integer, it is necessary to cast this value to a ssssttttrrrruuuucccctttt
- pppprrrrddddaaaa____ssssyyyyssss **** before using it. Also, since the optimizer can remove
- references to variables which have no apparent uses, it is best
- to declare the variable with the _v_o_l_a_t_i_l_e attribute:
-
- vvvvoooollllaaaattttiiiilllleeee ssssttttrrrruuuucccctttt pppprrrrddddaaaa____ssssyyyyssss ****pppprrrrddddaaaa____ssssyyyyssss;;;;
-
- After a SSSSEEEETTTTHHHHIIIINNNNTTTTSSSS command, the process may write scheduling modes
- to the _t__h_i_n_t field of the _p_r_d_a__s_y_s structure. These scheduling
- modes will be observed by the kernel at process dispatch time.
- The scheduling modes are the same as those defined for the
- SSSSCCCCHHHHEEEEDDDDMMMMOOOODDDDEEEE command.
-
- Also, the _t__c_p_u field may be read by user code to obtain the
- identifier of the cpu where the process was recently scheduled.
-
- The next two commands provide control over the scheduling of groups of
- parallel processes on multi-cpu systems. The processes must be members
- of the same _s_h_a_r_egroup (see _s_p_r_o_c(2) for more information about share
- groups). Note that the SSSSCCCCHHHHEEEEDDDDMMMMOOOODDDDEEEE and SSSSEEEETTTTMMMMAAAASSSSTTTTEEEERRRR commands can only be used
- after a share group has been created.
-
- SSSSCCCCHHHHEEEEDDDDMMMMOOOODDDDEEEE
- This command allows a member of a share group to set a _s_c_h_e_d_u_l_i_n_g
- _m_o_d_e for the entire share group. _a_r_g_1 specifies the scheduling
- mode. These are SSSSGGGGSSSS____FFFFRRRREEEEEEEE, which specifies that each member of
- the share group is to be scheduled independently, SSSSGGGGSSSS____SSSSIIIINNNNGGGGLLLLEEEE,
- which specifies that only the _m_a_s_t_e_r is to run (see SSSSEEEETTTTMMMMAAAASSSSTTTTEEEERRRR for
- setting the master thread), and SSSSGGGGSSSS____GGGGAAAANNNNGGGG, which specifies that
- all members of the share group are to be scheduled as a unit, if
- possible. The default scheduling mode when a share group is
- created is SSSSGGGGSSSS____FFFFRRRREEEEEEEE.
-
- The previous scheduling mode is returned.
-
- SSSSEEEETTTTMMMMAAAASSSSTTTTEEEERRRR
- This command sets the _m_a_s_t_e_r _p_r_o_c_e_s_s of the share group. _a_r_g_1
- specifies the _p_i_d of the new master process.
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- sssscccchhhheeeeddddccccttttllll((((2222)))) sssscccchhhheeeeddddccccttttllll((((2222))))
-
-
-
- By default, the creator of the share group is the master process.
- The master process differs from other members of the share group
- only in the case of the SSSSGGGGSSSS____SSSSIIIINNNNGGGGLLLLEEEE scheduling mode. In that
- case, only the master process will run. This operation can only
- be performed by the master of the share group. On success, 0 is
- returned.
-
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____CCCCRRRREEEEAAAATTTTEEEE
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____DDDDEEEEQQQQUUUUEEEEUUUUEEEE
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____DDDDEEEESSSSTTTTRRRROOOOYYYY
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____EEEENNNNQQQQUUUUEEEEUUUUEEEE
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____GGGGEEEETTTTAAAATTTTTTTTRRRR
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____GGGGEEEETTTTQQQQUUUUEEEEUUUUEEEELLLLEEEENNNN
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____IIIINNNNTTTTRRRR
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____JJJJOOOOIIIINNNN
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____PPPPIIIINNNNSSSSEEEERRRRTTTT
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____PPPPRRRREEEEMMMMOOOOVVVVEEEE
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____RRRREEEEAAAADDDDQQQQUUUUEEEEUUUUEEEE
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____RRRREEEESSSSUUUUMMMMEEEE
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____SSSSEEEETTTTAAAATTTTTTTTRRRR
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____SSSSTTTTAAAARRRRTTTT
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____SSSSTTTTOOOOPPPP
- MMMMPPPPTTTTSSSS____FFFFRRRRSSSS____YYYYIIIIEEEELLLLDDDD
- These are all interfaces that are used to implement various
- _f_r_s functions. These are all subject to change and should
- not be called directly by applications.
-
- <_s_y_s/_s_c_h_e_d_c_t_l._h>.
-
- _s_c_h_e_d_c_t_l will fail if any of the following are true:
-
- [EINVAL] An invalid command or new value was passed to the system.
-
- [EINVAL] The command was SSSSCCCCHHHHEEEEDDDDMMMMOOOODDDDEEEE, and either the process was not a
- member of a share group, or _a_r_g_1 did not specify a valid
- scheduling mode.
-
- [EINVAL] The command was SSSSEEEETTTTMMMMAAAASSSSTTTTEEEERRRR, and either the process was not a
- member of a share group, the process was not the current
- master of the share group, or _a_r_g_1 specified a process that
- was not a member of the share group.
-
- [EPERM] An attempt was made to perform privileged operations without
- appropriate permissions.
-
- [ESRCH] The named process was not found.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- npri(1), nice(2), prctl(2), sched_getparam(2), sched_setparam(2),
- sched_getscheduler(2), sched_yield(2), sched_get_priority_max(2),
- sched_get_priority_min(2), sched_rr_get_interval(2), sproc(2), sysmp(2)
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- sssscccchhhheeeeddddccccttttllll((((2222)))) sssscccchhhheeeeddddccccttttllll((((2222))))
-
-
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- _s_c_h_e_d_c_t_l returns -1 if an error occurred. Otherwise, the return is
- dependent on _c_m_d.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-